#ifndef PAbstracts_H
#define PAbstracts_H
#include "ado/stdafx.h"
#include <iostream>
#include <map>
//#include "standard/Exception.h"
#include "Selects.h"
#include "Inserts.h"
#include "Replaces.h"
#include "Updates.h"
#include "Deletes.h"
#include "standard/DBConfig.h"
    
/*
typedef struct TDataBase {
    std::string classname;
    std::string database; 
    std::string rootpath;
} tDataBase;
*/
   
class PAbstracts 
{
public:
    PAbstracts();
    ~PAbstracts();
    int setTableName(std::string name);
    int setDatabaseName(std::string database);
    Selects * find(const char *tokens, ...);
    Inserts * insertp(std::map<std::string, std::string>);
    Replaces * replacep(std::map<std::string, std::string> sets);
    Updates * setp(std::map<std::string, std::string>);
    Deletes * setv();

private:
    MYSQL* m_newmcon;
    bool m_isnewcon;
    std::string _where;    
};

extern tDataBase tData;

#endif
